const request=require('../../../../utils/request.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  onLoad: function (options) {
    console.log(options);
    let cinemaid=parseInt(options.cinemaid);
    this.setData({cinemaid});

    this.getcinemainfo();
  
  },

async getcinemainfo(){
  
  let cinemainfo=await request.myrequest('/miniapp/getcinemaInfo',{cinemaid:this.data.cinemaid});
  console.log(cinemainfo);
  this.setData({cinemainfo:cinemainfo.data[0]})
  wx.openLocation({
      latitude:cinemainfo.data[0].latitude,
      longitude:cinemainfo.data[0].longitude,
      scale: 18,
      name:cinemainfo.data[0].nm
    })

}

})